package com.liliudong.pinkyponk.biz.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liliudong.pinkyponk.biz.sys.entity.SysMenu;
import com.liliudong.pinkyponk.common.db.annotation.IgnoreDataScope;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * SysMenuMapper
 *
 * @author liliudong
 * @date 2022-06-01 13:38
 **/
@Mapper
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    /**
     * selectAuthoritiesByRoleIds
     *
     * @param roleIds
     * @return
     */
    @IgnoreDataScope
    List<String> selectAuthoritiesByRoleIds(List<Integer> roleIds);

    /**
     * selectAllAuthorities
     *
     * @return
     */
    @IgnoreDataScope
    List<String> selectAllAuthorities();

    /**
     * selectListByUserIdIgnoreDataScope
     *
     * @param userId
     * @return
     */
    @IgnoreDataScope
    List<SysMenu> selectMenuListByUserIdIgnoreDataScope(@Param("userId") Long userId);
}
